﻿using MVCManage.Model;
using MVCManage.Model.Base;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Linq;
using System.Data.Entity.Migrations;
namespace MVCMamage.DAL
{
    public class ImagesDAL:BaseDAL<Images>
    {
        User entity = new User();
       
        public Images AddTx(Images img)
        {
          
            entity.Images.Add(img);
            entity.SaveChanges();
            return img;


        }
        public int Xg(int Uid,int ImgId) {
         var zhi =  entity.Users.Where(n => n.userID == Uid).FirstOrDefault();
            zhi.imgID= ImgId;
            return entity.SaveChanges();
        }
       
    }
}
